#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h> 
#include <stdlib.h> 
#include <string.h> 
#include <math.h> 
#include <ctype.h> 
#include <time.h> 
#include <assert.h>

int main()
{
	int n = 0;
	scanf("%d", &n);
	if (n < 1)
	{
		printf("-1");
		return 0;
	}

	double up = 2;
	double low = 1;
	double sum = 0;
	for (int i = 1; i <= n; i++)
	{
		sum += up / low;
		double temp = low;
		low = up;
		up += temp;
	}
	
	printf("%.1f", sum);
	return 0;
}
